<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>坐标轴</title>
    <script src="../echarts.min.js"></script>
</head>
<body>
    <div id="main" style="height: 400px;width: 600px;"></div>
</body>
    <script>
        mychart = echarts.init(document.getElementById("main"))
        option = {
            title:{
                text:"坐标轴",
                subtext:"这是副标题",
                left:"center"
            },
            tooltip:{},
            legend:{
                data:["各产品销售情况"]
            },
            xAxis:{
                data:["产品A","产品B","产品C",'产品D',"产品E"],
                name:"产品名称",
                nameLocation:"center",
                nameGap:35
            },
            yAxis:{
                name:"产品销量",
                nameLocaion:"center",
                nameGap:10
            },
            series:[{
                name:"销量",
                type:"bar",
                data:[900,700,550,1000,200]
            }]
        }
        mychart.setOption(option)
    </script>
</html>